@mitu
I solved the problem. It was in the source code of hid-nx....
see here. It was the BTN_0 and BTN_1
I modified the code like this for both controllers and they are now working correctly!
Can be found starting here
static const struct nx_con_button_mapping gencon_button_mappings[] = {
{ BTN_SOUTH, NX_CON_BTN_A, },
{ BTN_EAST, NX_CON_BTN_B, },
{ BTN_WEST, NX_CON_BTN_R, },
{ BTN_DPAD_LEFT, NX_CON_BTN_X, },
{ BTN_DPAD_UP, NX_CON_BTN_Y, },
{ BTN_DPAD_RIGHT, NX_CON_BTN_L, },
{ BTN_THUMBL, NX_CON_BTN_ZR, },
{ BTN_START, NX_CON_BTN_PLUS, },
{ BTN_SELECT, NX_CON_BTN_HOME, },
{ BTN_MODE, NX_CON_BTN_CAP, },
{ /* sentinel */ },
};
/*
* N64's C buttons get assigned to d-pad directions and registered as buttons.
*/
static const struct nx_con_button_mapping n64con_button_mappings[] = {
{ BTN_A, NX_CON_BTN_A, },
{ BTN_B, NX_CON_BTN_B, },
{ BTN_Z, NX_CON_BTN_ZL, },
{ BTN_TL, NX_CON_BTN_L, },
{ BTN_TR, NX_CON_BTN_R, },
{ BTN_TR2, NX_CON_BTN_LSTICK, },
{ BTN_START, NX_CON_BTN_PLUS, },
{ BTN_DPAD_UP, NX_CON_BTN_Y, },
{ BTN_DPAD_DOWN, NX_CON_BTN_ZR, },
{ BTN_DPAD_LEFT, NX_CON_BTN_X, },
{ BTN_DPAD_RIGHT, NX_CON_BTN_MINUS, },
{ BTN_THUMBL, NX_CON_BTN_HOME, },
{ BTN_MODE, NX_CON_BTN_CAP, },
{ /* sentinel */ },
};